package su.domain;

import javax.validation.constraints.Email;
import javax.validation.constraints.Pattern;

public class Emp {
    private Integer id;

    @Pattern(regexp = "(^[a-zA-Z0-9_-]{3,16}$)|(^[\\u2E80-\\u9FFF]{2,5})", message = "用户名必须6-16")
    private String name;

    private String gender;

    @Email(message = "邮箱格式不正确")
    private String email;

    private Integer idtodepid;

    private Dep dep;


    public Dep getDep() {
        return dep;
    }

    public void setDep(Dep dep) {
        this.dep = dep;
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Integer getIdtodepid() {
        return idtodepid;
    }

    public void setIdtodepid(Integer idtodepid) {
        this.idtodepid = idtodepid;
    }

    @Override
    public String toString() {
        return "Emp{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", email='" + email + '\'' +
                ", idtodepid=" + idtodepid +
                ", dep=" + dep +
                '}';
    }
}